paned: Don't pass values < -1 to gtk_widget_measure()
authorTimm Bäder <mail@baedert.org>
Fri, 5 Nov 2021 16:41:08 +0000 (17:41 +0100)
committerTimm Bäder <mail@baedert.org>
Fri, 5 Nov 2021 16:41:42 +0000 (17:41 +0100)
Fixes #4404

gtk/gtkpaned.c

index e12c8e5c9c2e3ffce366b7b88774218fa2367171..e4d8ff8124f476866e0c5d88c0d75bcf0af889d7 100644 (file)
@@ -1197,7 +1197,7 @@ gtk_paned_get_preferred_size_for_opposite_orientation (GtkWidget      *widget,
     {
       gtk_widget_measure (paned->start_child,
                           OPPOSITE_ORIENTATION (paned->orientation),
-                          for_start_child,
+                          MAX (for_start_child, -1),
                           &child_min, &child_nat,
                           NULL, NULL);
 
@@ -1209,7 +1209,7 @@ gtk_paned_get_preferred_size_for_opposite_orientation (GtkWidget      *widget,
     {
       gtk_widget_measure (paned->end_child,
                           OPPOSITE_ORIENTATION (paned->orientation),
-                          for_end_child,
+                          MAX (for_end_child, -1),
                           &child_min, &child_nat,
                           NULL, NULL);